package cn.chl.feign;

import cn.chl.domain.Device;
import cn.chl.result.JSONResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

@FeignClient(value = "device-server")
@RequestMapping("/api/device")
public interface DeviceFeignClient {

    @GetMapping("/getDeviceInfoById/{id}")
    JSONResult getDeviceInfoById(@PathVariable("id") Integer id);

    @GetMapping("/getBuildById/{id}")
    List<Device> getBuildById(@PathVariable("id") Integer id);

    @GetMapping("/getFloorById/{id}")
    List<Device> getFloorById(@PathVariable("id") Integer id);

    @GetMapping("/getTypeById/{type}")
    List<Device> getTypeById(@PathVariable("type") Integer type);
}
